package com.ceair.config;

import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wangbaohai
 * @ClassName MyChatAssistantConfig
 * @description: 智能体配置
 * @date 2025年05月17日
 * @version: 1.0.0
 */
@Configuration
public class MyChatAssistantConfig {

    @Bean
    ChatMemory chatMemory() {
        // 设置聊天记忆记录的message数量
        return MessageWindowChatMemory.withMaxMessages(10);
    }

}
